package pri.syl.xiaowu.websocket.netty.core.factory.constant;

/**
 * @Author YunLong
 * @Date 2021/7/18 18:51
 * @Description 自定义线程池配置
 **/
public final class ThreadPoolConstant {
    public static final String HTTP_SERVER_HANDSHAKE = "HttpServerHandshake";
    public static final int HTTP_SERVER_HANDSHAKE_CORE_POOL_SIZE = Runtime.getRuntime().availableProcessors() * 2;
    public static final int HTTP_SERVER_HANDSHAKE_MAXIMUM_POOL_SIZE = Runtime.getRuntime().availableProcessors() * 2;
    public static final int HTTP_SERVER_HANDSHAKE_KEEP_ALIVE_TIME = 0;

    public static final String WEBSOCKET_SERVER_BUSINESS = "WebsocketServerBusiness";
    public static final int WEBSOCKET_SERVER_BUSINESS_CORE_POOL_SIZE = Runtime.getRuntime().availableProcessors() * 3;
    public static final int WEBSOCKET_SERVER_BUSINESS_MAXIMUM_POOL_SIZE = Runtime.getRuntime().availableProcessors() * 3;
    public static final int WEBSOCKET_SERVER_BUSINESS_KEEP_ALIVE_TIME = 0;

    public static final String WEBSOCKET_SERVER_INIT = "WebsocketServerInit";
    public static final int WEBSOCKET_SERVER_INIT_CORE_POOL_SIZE = 1;
    public static final int WEBSOCKET_SERVER_INIT_MAXIMUM_POOL_SIZE = 1;
    public static final int WEBSOCKET_SERVER_INIT_KEEP_ALIVE_TIME = 0;

    private ThreadPoolConstant() {
    }

}
